<?php

use yii\db\Migration;
use yii\db\Schema;

/**
 * Class m180412_014941_ADD_FIELD_CUSTOMER
 */
class m180412_014941_ADD_FIELD_CUSTOMER extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('{{customer}}', 'area', Schema::TYPE_STRING. "(64) NULL COMMENT '大区'");
        $this->addColumn('{{customer_check}}', 'status', Schema::TYPE_INTEGER. "(1) DEFAULT  '1' COMMENT '1正常  2禁用'");
        $this->addColumn('{{customer_check}}', 'group', Schema::TYPE_STRING. "(64) NULL COMMENT '团号'");
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        echo "m180412_014941_ADD_FIELD_CUSTOMER cannot be reverted.\n";

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m180412_014941_ADD_FIELD_CUSTOMER cannot be reverted.\n";

        return false;
    }
    */
}
